#include"wall.h"

void Wall::initwall()
{
	for (int i = 0; i < ROW; i++)
	{
		for (int j = 0; j < COL; j++)
		{
			if (i == 0 || j == 0 || i == ROW - 1 || j == COL-1) {
				gameArray[i][j] = '*';
			}
			else {
				gameArray[i][j] = ' ';
			}
		}
	}
}

void Wall::showwall()
{
	for (int i = 0; i < ROW; i++)
	{
		for (int j = 0; j < COL; j++)
		{
			cout << gameArray[i][j]<<" ";
		}
		if (i == 6) {
			cout << "create by ldc";
		}		
		if (i == 7) {
			cout << "left:a";
		}
		if (i == 8) {
			cout << "right:d";
		}
		if (i == 9) {
			cout << "up:w";
		}
		if (i == 10) {
			cout << "down:s";
		}
		cout << endl;
	}
}

void Wall::setwall(int x, int y, char c)
{
	gameArray[x][y] = c;
}

char Wall::getwall(int x, int y)
{
	return gameArray[x][y];
}
